package com.hx.staticState.demo1;

/**
 * @Author： Huathy
 * @ClassPath： com.hx.builder.com.hx.staticState.demo1.Worker
 * @Date： 2021-01-31 12:51
 * @Description： 具体的建造者：工人
 */
public class Worker extends Builder {
    private Product product;

    public Worker() {
        product = new Product();
    }

    @Override
    void buildA() {
        product.setBuildA("A");
        System.out.println("A");
    }

    @Override
    void buildB() {
        product.setBuildB("B");
        System.out.println("B");
    }

    @Override
    void buildC() {
        product.setBuildC("C");
        System.out.println("C");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
